package com.joysuch.wwyt.bp.enums;

import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;

/**
 * 排查任务记录，排查结论
 * App时间片状态
 */
public enum InvestigateSubTimeStatus {
    NORMAL(1,"正常"),
    NU_NORMAL(2,"异常"),
    NOT_STARTED(3,"未开始"),
    CAN_ENTER_CHECK(4, "进入排查");

    private Integer code;
    private String status;

    public String getStatus() {
        return status;
    }
    public final Integer getCode() {
        return code;
    }

    InvestigateSubTimeStatus(Integer code, String status) {
        this.code = code;
        this.status = status;
    }
    private static final Map<Integer, InvestigateSubTimeStatus> lookup = new HashMap<>();

    static {
        for (InvestigateSubTimeStatus e : EnumSet.allOf(InvestigateSubTimeStatus.class)) {
            lookup.put(e.code, e);
        }
    }

    public static InvestigateSubTimeStatus find(Integer value) {
        return lookup.get(value);
    }
}
